import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:'/index',
    component:()=>import('../pages/index.vue'),
  },
  {
    path:'/plantInfo',
    component:()=>import('../views/plantInfo.vue')
  },
  {
    path:'/income',
    component:()=>import('../views/income.vue')
  },
  {
    path:'/annular',
    component:()=>import('../views/annular.vue')
  },
  {
    path:'/pie',
    component:()=>import('../views/pie.vue')
  },
  {
    path:'/line',
    component:()=>import('../views/line.vue')
  },
  {
    path:'/map',
    component:()=>import('../views/map.vue')
  },
  {
    path:'*',
    redirect:'/map'
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
